import 'dart:ffi' as ffi;

import 'package:test/test.dart';

import 'package:napi/src/arkreference.dart';

//ETS 注入 env 后可替换为真实 N-API 往返
void main() {
  group('ArkReference', () {
    test('global reference release flags', () {
      final ref = ArkGlobalReference(ffi.Pointer.fromAddress(0x1000));
      expect(ref.isNull, isFalse);
      expect(ref.isReleased, isFalse);
      ref.release();
      expect(ref.isReleased, isTrue);
    });
  });
}



